<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./toolis.js"></script>
  </head>
  <body>
      <div id="box"></div>
    <script type="text/html" id="tpl">
        <p>{{uname}}</p>
        <p>{{age}}</p>
    </script>
    <script>
        let data = {
        uname: "张三",
        age: 18,
      };

      let res = template('tpl',data)
      document.querySelector('#box').innerHTML = res
    </script>
  </body>
</html>
